package org.aepscolombia.platform.models.entity;
// Generated Jan 13, 2014 2:36:33 PM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Profiles generated by hbm2java
 */
@Entity
@Table(name="profiles"
    ,catalog="madr_bd10"
)
public class Profiles  implements java.io.Serializable {


     private Integer idPro;
     private String namePro;
     private String descriptionPro;
     private Integer idProjectPro;
     private Boolean statusPro;
     private Set usersProfileses = new HashSet(0);
     private Set privilegeses = new HashSet(0);

    public Profiles() {
    }

	
    public Profiles(String namePro, String descriptionPro) {
        this.namePro = namePro;
        this.descriptionPro = descriptionPro;
    }
    public Profiles(String namePro, String descriptionPro, Integer idProjectPro, Boolean statusPro, Set usersProfileses, Set privilegeses) {
       this.namePro = namePro;
       this.descriptionPro = descriptionPro;
       this.idProjectPro = idProjectPro;
       this.statusPro = statusPro;
       this.usersProfileses = usersProfileses;
       this.privilegeses = privilegeses;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id_pro", unique=true, nullable=false)
    public Integer getIdPro() {
        return this.idPro;
    }
    
    public void setIdPro(Integer idPro) {
        this.idPro = idPro;
    }
    
    @Column(name="name_pro", nullable=false, length=50)
    public String getNamePro() {
        return this.namePro;
    }
    
    public void setNamePro(String namePro) {
        this.namePro = namePro;
    }
    
    @Column(name="description_pro", nullable=false)
    public String getDescriptionPro() {
        return this.descriptionPro;
    }
    
    public void setDescriptionPro(String descriptionPro) {
        this.descriptionPro = descriptionPro;
    }
    
    @Column(name="id_project_pro")
    public Integer getIdProjectPro() {
        return this.idProjectPro;
    }
    
    public void setIdProjectPro(Integer idProjectPro) {
        this.idProjectPro = idProjectPro;
    }
    
    @Column(name="status_pro")
    public Boolean getStatusPro() {
        return this.statusPro;
    }
    
    public void setStatusPro(Boolean statusPro) {
        this.statusPro = statusPro;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="profiles")
    public Set getUsersProfileses() {
        return this.usersProfileses;
    }
    
    public void setUsersProfileses(Set usersProfileses) {
        this.usersProfileses = usersProfileses;
    }
@ManyToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
    @JoinTable(name="profiles_privileges", catalog="madr_bd10", joinColumns = { 
        @JoinColumn(name="id_profile_pro_pri", nullable=false, updatable=false) }, inverseJoinColumns = { 
        @JoinColumn(name="id_privilege_pro_pri", nullable=false, updatable=false) })
    public Set getPrivilegeses() {
        return this.privilegeses;
    }
    
    public void setPrivilegeses(Set privilegeses) {
        this.privilegeses = privilegeses;
    }




}


